package gameEngine.agents.distrebution;

import java.util.Random;

import org.apache.log4j.Logger;

public class Uniform implements Distribution{

	Logger log = Logger.getLogger(this.getClass());
	
	/**
	 *  The mean of the uniform distribution is 0.5  (normalize to 0-1)
	 *  @return double - 0.5
	 */
	public double getMean() {
		return 0.5;
	}
	
	
	/**
	 *  The variance of the uniform distribution is 1/12  (normalize to 0-1)
	 *  @return double - 1/12
	 */
	public double getVariance() {
		return 1/12;
	}

	/**
	 *  @return double - random value between 0 to 1
	 */
	public double generateValue() {
		return (new Random()).nextDouble();
	}
	
	public Uniform clone(){
		return new Uniform();
	}

}
